package web

import (
	"gitee.com/DonHz/basic-go/webook/pkg/ginx"
	"github.com/gin-gonic/gin"
)

type Result = ginx.Result

func ReturnSuccess (c *gin.Context, code int, msg string, data any, count int64) {
	json:=&Result{
		Code:code,
		Msg: msg,
		Data: data,
		Count: count,
	}
	c.JSON(200, json)
}

func ReturnError (c *gin.Context, code int, msg string) {
	json:=&Result{
		Code:code,
		Msg: msg,
	}
	c.JSON(200, json)
}
